/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.xd.manager;

import java.util.Collection;
import java.util.List;

import com.xy.biz.xd.domain.bo.DocumentReleaseBO;
import com.xy.biz.xd.domain.query.DocumentReleaseQuery;

/**
 *
 *
 * @author wcs
 * @date 2021-3-4
 */
public interface DocumentReleaseManager {

	/**
	 * 保存
	 *
	 * @param documentReleaseBO
	 */
	int saveDocumentRelease(DocumentReleaseBO documentReleaseBO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllDocumentRelease(Collection<DocumentReleaseBO> collection);

	/**
	 * 更新
	 *
	 * @param documentReleaseBO
	 */
	int updateDocumentRelease(DocumentReleaseBO documentReleaseBO);
	int updateAllDocumentRelease(Collection<DocumentReleaseBO> collection);


	/**
	 * 更新
	 *
	 * @param documentReleaseBO
	 */
	int updateDocumentReleaseEffectDateById(DocumentReleaseBO documentReleaseBO);

	/**
	 * 流程更新
	 * @param query
	 * @return
	 */
    int updateDocumentReleaseForFlow(DocumentReleaseQuery query);

    /**
	 * 删除
	 *
	 * @param documentReleaseId
	 */
	int deleteDocumentRelease(Long documentReleaseId);
	int deleteDocumentRelease(Collection<Long> collection);

	/**
	 * 查找一个
	 *
	 * @param documentReleaseId
	 * @return
	 */
	DocumentReleaseBO getDocumentRelease(Long documentReleaseId);

	/**
	 * 查找
	 *
	 * @param documentCode
	 * @return
	 */
	List<DocumentReleaseBO> listDocumentReleaseByDocumentCode(String documentCode);

	/**
	 * 查找一个
	 *
	 * @param documentReleaseQuery
	 * @return
	 */
	DocumentReleaseBO getDocumentRelease(DocumentReleaseQuery documentReleaseQuery);

	/**
	 * 查找多个
	 *
	 * @param query 标识集合
	 */
	List<DocumentReleaseBO> listDocumentReleaseById(DocumentReleaseQuery query);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<DocumentReleaseBO> listDocumentRelease(DocumentReleaseQuery query);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<DocumentReleaseBO> listAllDocumentRelease(DocumentReleaseQuery query);

	List<DocumentReleaseBO> listDocumentReleaseByReleaseId(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	int countDocumentReleaseByFlowId(DocumentReleaseQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countDocumentRelease(DocumentReleaseQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countAllDocumentRelease(DocumentReleaseQuery query);


	/**
	 * 生效
	 *
	 * @param query
	 */
	DocumentReleaseBO takeEffectDocumentRelease(DocumentReleaseQuery query);

	/**
	 * 失效
	 *
	 * @param query
	 */
	DocumentReleaseBO loseEffectDocumentRelease(DocumentReleaseQuery query);

	/**
	 * 文件生效
	 * @param query
	 * @return
	 */
	int takeEffectFlagDocumentRelease(DocumentReleaseQuery query);

	/**
	 * 文件失效
	 * @param query
	 * @return
	 */
	int loseEffectFlagDocumentRelease(DocumentReleaseQuery query);

	/**
	 * 文件生效
	 * @param query
	 * @return
	 */
	int takeEffectFlagDocumentReleaseById(DocumentReleaseQuery query);

	/**
	 * 文件失效
	 * @param query
	 * @return
	 */
	int loseEffectFlagDocumentReleaseById(DocumentReleaseQuery query);
}
